<?php session_start();
if(isset($_SESSION['user_id'])):
	$user_id=$_SESSION['user_id'];
	$user_email=$_SESSION['user_email'];
	$nickname=$_SESSION['nickname'];
	if(isset($_SESSION['admin']))
		$admin = true;
	else
		$admin = false;
else:
	header("Location: index.php");
endif;
require_once("php/curl.php");
$stats = json_decode(api("stats/","GET",null),true);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>spork!</title>
<!--scripts-->
<script src="scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="scripts/ui/jquery.ui.core.js"></script>
<script src="scripts/ui/jquery.ui.widget.js"></script>
<script src="scripts/ui/jquery.ui.position.js"></script>
<script src="scripts/ui/jquery.ui.autocomplete.js"></script>
<script src="scripts/jsCarousel-2.0.0.js" type="text/javascript"></script>
<script type="text/javascript" src="scripts/api.js?<?php echo time();?>"></script>
<script type="text/javascript" src="scripts/scripts.js?<?php echo time();?>"></script>

<!--styles-->
<link href="style/jquery.ui.all.css">
<link href="style/jsCarousel-2.0.0.css" rel="stylesheet" type="text/css" />
<link href="style/main.css?<?php echo time();?>" rel="stylesheet" type="text/css" />

<script>
	var user_id;
	$(document).ready(function(){
		size_labels();	
		user_id = <?php echo $user_id;?>;
		<?php if($admin):?>
		admin = true;
		<?php endif;?>
		subNav();
		setCarousel("#your");
		setCarousel("#favorite_slider");
		setCarousel("#friend_public");
	});
</script>
</head>
<body>

<?php include("nav.php");?>
<div id="container">
<div id="main">